package cn.wolfcode.luowowo.common.util;


import cn.wolfcode.luowowo.common.exception.LogicalException;

public abstract class AssertUtil {

    public static void notEmpty(String string,String msg) {
        if (string==null  || "".equals(string.trim())) {
            throw new LogicalException(msg);
        };

    }

    public static void equivalent(String password,String rpassword,String msg) {
        if(password==null || rpassword==null) {
            throw new LogicalException("参数不能为空");
        }
        if(!password.equals(rpassword)) {
            throw new LogicalException(msg);
        }
    }
}
